<template>
	<view class="content">
		<view v-if="show" class="w750">
			<u-cell-group v-for="(item, index) in dataTimeArr" :key='"inn"+index'>
				<u-cell size="large" :title="item" isLink @click="()=>timeImages(item)"></u-cell>
			</u-cell-group>
		</view>
		<view v-if="showTit" class="w750 h700 flex-center">
			<text>暂无上传内容.....</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: true,
				showTit: false,
				dataTimeArr: []
			}
		},
		mounted() {
			this.getTimeData()
		},
		methods: {
			getTimeData() {
				let userId = uni.getStorageSync('userId')
				this.$get('/security/auth/refreshUser2', {
					userId: userId,
				}).then(res => {
					if (res.data.workDates == undefined || res.data.workDates.length == 0) {
						this.show = false
						this.showTit = true
					} else {
						this.show = true
						this.showTit = false
						this.dataTimeArr = res.data.workDates
					}
				})
			},
			timeImages(item) {
				uni.navigateTo({
					url: '../imagelist/imagelist?time=' + item
				})
			}
		}
	}
</script>

<style scoped>
	.user-msg {
		border-bottom: 2px solid #adadad;
	}

	.user-img {
		width: 200rpx;
		height: 200rpx;
		float: left;
	}

	.user-data {
		width: 530rpx;
		height: 200rpx;
		float: right;
	}

	.tit {
		font-size: 23rpx;
	}
</style>
